<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<button id="PuTongTanChuang" type="button">我是普通小弹窗</button>
<button id="KeQuXiaoTanChuang" type="button">我是可取消小弹窗</button>
<button id="KeShuRuTanChuang" type="button">我是可输入小弹窗</button>
<body>
<script>
    onload=()=>{
        document.querySelector('#PuTongTanChuang').onclick=()=>{
            alert('我是普通小弹窗');
        }
        document.querySelector('#KeQuXiaoTanChuang').onclick=()=>{
            let returnValue=confirm('我是可取消的小弹窗');
            console.log(returnValue);
        }
        document.querySelector('#KeShuRuTanChuang').onclick=()=>{
            let  returnValue=prompt('我是可输入小弹窗');
            console.log(returnValue);
        }

    };

</script>
</body>
</html>